import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqSWrestleRoomHelper } from "./SeqSWrestleRoomHelper";
import { SWrestleRoom } from "./SWrestleRoom";
type int = number;
//class SWrestleGetRooms

export class SWrestleGetRooms extends IMessageBase {
  constructor(autoreg: Boolean = false) {
    
    super();if (autoreg) {
      MessageManager.instance().regist(this);
    }
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SWrestleGetRooms();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    arg1.writeInt(this.mark);
    SeqSWrestleRoomHelper.write(arg1, this.rooms);
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.mark = arg1.readInt();
    this.rooms = SeqSWrestleRoomHelper.read(arg1);
  }

  public /* const */ _type: int = 613;

  public /* var */ mark!: int;

  public /* var */ rooms!: Array<SWrestleRoom>;

  public static /* var */ _regist: SWrestleGetRooms = new SWrestleGetRooms(
    true
  );
}
